<?php
namespace app\admin\model\jy;

use app\common\model\jy\Order as CommonOrder;

class Order extends CommonOrder {
	protected $hidden = [];
	protected $append = ['status_text', 'profit_sharing_text', 'is_profit_sharing', 'profit_sharing'];

	public function getIsProfitSharingAttr($value, $data) {
		return $data['profit_sharing'] == loadEnum('ProfitSharing')->code2key('fenzhang') && $data['status'] == loadEnum('OrderStatus')->code2key('yiwancheng');
	}
}
